package game;

import scenarios.AbstractScenario;

public class Player {
	
	private City homecity = null;
	private long roundnr = 1;
	private boolean gameActive = true;
	
	public boolean isGameActive() {
		return gameActive;
	}

	public void setGameActive(boolean gameActive) {
		this.gameActive = gameActive;
	}

	private AbstractScenario scenario = null;
	
	public AbstractScenario getScenario() {
		return scenario;
	}

	public void setScenario(AbstractScenario scenario) {
		this.scenario = scenario;
	}

	public Player(String name, City homecity) {
		this.homecity = homecity;
	}

	public City getHomecity() {
		return homecity;
	}

	public void setHomecity(City homecity) {
		this.homecity = homecity;
	}
	
	public void nextRound() {
		if (!gameActive) return;
		if (homecity == null) return;
		homecity.round();
		roundnr = roundnr + 1;
		if (scenario!=null) {
			scenario.checkWinConditions(this);
		}
	}

	public long getRoundnr() {
		return roundnr;
	}

	public void setRoundnr(long roundnr) {
		this.roundnr = roundnr;
	}
	
	
	
	
}
